package day240515.e1;

public class DogWeightComparator implements MyComparator {

    @Override
    public int compare(Object o1, Object o2) {
        Dog d1 = (Dog) o1;
        Dog d2 = (Dog) o2;
        if (d1.weight == d2.weight) return 0;
        else return d1.weight - d2.weight > 0 ? 1 : 0;
    }
}
